Context-sensitive Computations in Functional and Functional Logic Programs

نویسنده

  • Salvador Lucas
چکیده

Context-sensitive rewriting is a refined form of rewriting that explores a smaller reduction space by imposing some fixed restrictions on the replacements. Any Term Rewriting System (TRS) can be given a context-sensitive rewrite relation. In this paper, we review the theory of context-sensitive rewriting and formulate conditions to guarantee the confluence of this relation. Also, for left-linear TRSs, we show that the (eventually obtained) computed value of a given expression can also be produced by context-sensitive rewriting, thus furnishing more efficient and still complete computations. We give the procedure for establishing the adequate replacement restrictions in order to achieve this. Finally, we raise the concept of context-sensitive restrictions from rewriting to narrowing, and provide the corresponding completeness results.1

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Towards a Safe Partial Evaluation of Lazy Functional Logic Programs

Partial Evaluation is a well-known technique for specializing programs w.r.t. a given restriction of their input data. Although partial evaluation has been widely investigated in the context of functional and functional logic languages like Haskell or Curry, current schemes are either overly restrictive or destroy sharing through the specialization process, which may produce incorrect specializ...

متن کامل

Semantics of Programs with Strategy Annotations

Strategy annotations provide a simple strategy language which is used in a number of programming languages and rewriting-based systems for improving the termination behavior and avoiding useless computations. Examples are the E-strategies of Maude, OBJ2, OBJ3, and CafeOBJ, and thèjust-in-time' strategies of JITty and CRL. We show that context-sensitive rewriting strategies provide an appropriat...

متن کامل

Termination of canonical context-sensitive rewriting and productivity of rewrite systems

Termination of programs, i.e., the absence of infinite computations, ensures the existence of normal forms for all initial expressions, thus providing an essential ingredient for the definition of a normalization semantics for functional programs. In lazy functional languages, though, infinite data structures are often delivered as the outcome of computations. For instance, the list of all prim...

متن کامل

Architecture of a Virtual Machine for Functional Logic Computations

We describe the architecture of a virtual machine for executing functional logic programming languages. A distinguishing feature of our machine is that it preserves the operational completeness of non-deterministic programs by concurrently executing a pool of independent computations. Each computation executes only root-needed sequential narrowing steps. We describe the machine’s architecture a...

متن کامل

A functional quantum programming language

This thesis introduces the language QML, a functional language for quantumcomputations on finite types. QML exhibits quantum data and control structures,and integrates reversible and irreversible quantum computations.The design of QML is guided by the categorical semantics: QML programs are in-terpreted by morphisms in the category FQC of finite quantum computations, whichpr...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:
  • Journal of Functional and Logic Programming

دوره 1998  شماره 

صفحات  -

تاریخ انتشار 1998